#ifndef __GUI_CTRL_H__
#define __GUI_CTRL_H__

enum GUI_MSG{
    GUI_SHOW_IDLE,
	GUI_SHOW_WAIT,
	GUI_SHOW_CHARGE,
	GUI_SHOW_SETTLE,
	GUI_SHOW_ALARM,
	GUI_SHOW_MSG,
	GUI_UPDATE_CHARGE,
	GUI_SHOW_START_FAIL,
	GUI_UPDATE_NET_STATE,
};


enum//TYPE
{
    E_PIPETYPE_CHANGESTATE = 0,
    E_PIPETYPE_UPDATEDATA,
    E_PIPETYPE_SIGNALS,
};

enum//msg
{
    E_STATE_NULL,
    E_STATE_IDLE,
    E_STATE_WAITFORCARD,
    E_STATE_ALARM,
    E_STATE_CHARGING,
    E_STATE_POINTMSG,
    E_STATE_POINTMSGWITHTIME,
    E_STATE_SETTLE,
    E_STATE_STARTFAILED,
    E_STATE_WAITFORGUN,
};
enum
{
    E_SIG_GUNSELECT,
    E_SIG_TIMEOUT,
    E_SIG_RETURN,
    E_SIG_CANCEL,
    E_SIG_NET,
    E_SIG_SAVE,
    E_SIG_STOP,
};

struct t_detailidle
{
    unsigned int value;
};

struct t_detailwaitcard
{
    unsigned int cnt;
};

struct t_detailalarm
{
    char pointmsg[256];
};

struct t_detailcharging
{
    char soc[20];
    char kwh[20];
    char totaltime[20];
    char lasttime[20];
    char current[20];
    char voltage[20];
    char state[100];
    char pointmsg[256];
    int btstate; //按键状态 0 隐藏 1 显示
};

struct t_detailpoint
{
    char pointmsg[256];
};

struct t_detailpointwithtime
{
    unsigned int cnt;
    char pointmsg[256];
};

struct t_detailsettle
{
    unsigned int cnt;
    char totalpower[20];
    char totaltime[20];
    char totalcost[20];
};
struct t_detailstartfail
{
     unsigned int cnt;
     char pointmsg[256];
};

struct t_detailwaitforgun
{
    unsigned int cnt;
};

struct t_detailsig
{
    unsigned int sigtype;
    char sigdetail[256];
};

void guictrl_show(int gunid, int cmd, char *msg, int len);
void guictrl_poll(void);
int guictrl_init(void);


#endif
